﻿ 
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.IO;
using System.Web;

namespace SystemCommon
{
    /// <summary>
    /// 本文件是用于返回本系统的绝对路径
    /// </summary>
    public class SysPathBaseClass
    {
        /// <summary>
        /// 
        /// </summary>
        public SysPathBaseClass() { }

        /// <summary>
        /// 系统所在目录
        /// </summary>
        public static string SysPath
        {
            get
            {
                string Sys_Web_Path = "";
                if (string.IsNullOrEmpty(Sys_Web_Path))
                {
                    if (string.IsNullOrEmpty(AppDomain.CurrentDomain.RelativeSearchPath))
                    {
                        Sys_Web_Path = AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\') + "\\";
                    }
                    else
                    {
                        Sys_Web_Path = AppDomain.CurrentDomain.RelativeSearchPath.TrimEnd('\\') + "\\";
                    }
                }
                return Sys_Web_Path;
            }
        }
    }
}

